package com.synergy.stockflow.production.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "material_requisition")
public class MaterialRequisition {
    /**
     * 领料ID
     */
    @TableId(value = "requisition_id", type = IdType.ASSIGN_ID)
    @Schema(description="领料ID")
    private String requisitionId;

    /**
     * 领料单号(LL-年月序号)
     */
    @TableField(value = "requisition_code")
    @Schema(description="领料单号(LL-年月序号)")
    private String requisitionCode;

    /**
     * 领料单名称
     */
    @TableField(value = "requisition_name")
    @Schema(description="领料单名称")
    private String requisitionName;

    /**
     * 计划ID
     */
    @TableField(value = "plan_id")
    @Schema(description="计划ID")
    private String planId;

    /**
     * 领料人ID
     */
    @TableField(value = "applicant_id")
    @Schema(description="领料人ID")
    private String applicantId;

    /**
     * 状态(0=待领取,1=已领取)
     */
    @TableField(value = "`status`")
    @Schema(description="状态(0=待领取,1=已领取)")
    private Integer status;

    /**
     * 领料时间
     */
    @TableField(value = "required_time")
    @Schema(description="领料时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date requiredTime;

    /**
     * 完成时间
     */
    @TableField(value = "complete_time")
    @Schema(description="完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date completeTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @Schema(description="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @Schema(description="更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    /**
     * 领料详情
     */
    @TableField(exist = false)
    private List<MaterialRequisitionDetail> materialRequisitionDetails;
}